package richbar.com.richbar.adapter.home;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.okhttp.GlideUtil;

import java.util.List;

import richbar.com.richbar.R;
import richbar.com.richbar.bean.HomePageBean;
import richbar.com.richbar.util.NetWorkUtil;

/**
 * Created by QiYang on 2018/11/24.
 */

public class GridAdapter1 extends BaseQuickAdapter<HomePageBean.Data.Navlist> {
    public GridAdapter1(int layoutResId, List<HomePageBean.Data.Navlist> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, HomePageBean.Data.Navlist bean) {
        holder.setText(R.id.title,bean.getName());
        ImageView iv = holder.getView(R.id.pic);
        GlideUtil.loadImage(mContext, NetWorkUtil.URL + bean.getImg(),iv);
    }
}
